r = 1 gotdoll = 0 gotphoto = 0 gotrag = 0 gotskull = 0 littlegirl = 1 mother = 1 SCREEN 12 COLOR 2, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 45 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 39) AS STRING directions(1) = "WEST" directions(2) = "WEST OR EAST" directions(3) = "WEST OR EAST" directions(4) = "NORTH OR EAST" directions(5) = "NORTH OR SOUTH" directions(6) = "NORTH OR SOUTH" directions(7) = "NORTH, SOUTH, EAST, OR WEST" directions(8) = "EAST OR WEST" directions(9) = "NORTH OR WEST" directions(10) = "NORTH OR SOUTH" directions(11) = "WEST OR EAST" directions(12) = "NORTH OR EAST" directions(13) = "SOUTH" directions(14) = "NORTH OR SOUTH" directions(15) = "NORTH, SOUTH, OR EAST" directions(16) = "WEST" directions(17) = "NORTH OR SOUTH" directions(18) = "NORTH OR SOUTH" directions(19) = "SOUTH OR EAST" directions(20) = "EAST OR WEST" directions(21) = "EAST OR WEST" directions(22) = "NORTH OR WEST" directions(23) = "NORTH, SOUTH, OR EAST" directions(24) = "WEST" directions(25) = "NORTH OR SOUTH" directions(26) = "EAST, WEST, OR SOUTH" directions(27) = "WEST" directions(28) = "EAST OR WEST" directions(29) = "EAST" directions(30) = "NORTH, SOUTH, OR EAST" directions(31) = "NORTH, SOUTH, OR EAST" directions(32) = "EAST, WEST, OR SOUTH" directions(33) = "EAST" directions(34) = "EAST, WEST, OR SOUTH" directions(35) = "WEST OR SOUTH" directions(36) = "NORTH, SOUTH, WEST" directions(37) = "NORTH, SOUTH, EAST, WEST" directions(38) = "NORTH, EAST, OR WEST" directions(39) = "NORTH OR WEST" PRINT "" PRINT "" PRINT "What a night to have your car break down and on top of that" PRINT "it's raining out. You decided to take the back roads back" PRINT "to visit your parents and in the distance you can see an old" PRINT "house wuth it's lights on. Finally salvation, you figure, with" PRINT "your cell phone dead, you figure they must have a phone in" PRINT "order to call a tow truck. What's the worse that can happen?" PRINT "So now you step out of your car and begin the trek down the" PRINT "old country home. Maybe you'll make it in time before the night" PRINT "casts it's ugly blanket over the land." DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT " *-* ( " PRINT " ________|________%%__ " PRINT " |%%%%%%%%%%%%%%%%%%%%%| " PRINT " _____|%%%/^\%%%/^\%%%/^\%%%|_____ " PRINT " /%/^\%|%%%|-|%%%|-|%%%|-|%%%|%/^\%\ " PRINT " /%%|-|%|%%%%%%%%%%%%%%%%%%%%%|%|-|¾¾\ " PRINT " /%%%%%%%%| __ __ ___ __ __ |%%%%%%%%\ " PRINT " |_|-|-|_||__||__|.|.|__||__||_|-|-|_| " PRINT " IIIIIIII| |_|_| |IIIIIIII " PRINT " ~^ ^-@@@@@@@@| |@@@@@@@@-^ ^~ " PRINT " | |" PRINT " | |" PRINT " Welcome Home" PRINT " Written By" PRINT " D.B. Taylor " PRINT " Copyright (c) 2015 " PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 IF r = 10 THEN: GOSUB r10 IF r = 11 THEN: GOSUB r11 IF r = 12 THEN: GOSUB r12 IF r = 13 THEN: GOSUB r13 IF r = 14 THEN: GOSUB r14 IF r = 15 THEN: GOSUB r15 IF r = 16 THEN: GOSUB r16 IF r = 17 THEN: GOSUB r17 IF r = 18 THEN: GOSUB r18 IF r = 19 THEN: GOSUB r19 IF r = 20 THEN: GOSUB r20 IF r = 21 THEN: GOSUB r21 IF r = 22 THEN: GOSUB r22 IF r = 23 THEN: GOSUB r23 IF r = 24 THEN: GOSUB r24 IF r = 25 THEN: GOSUB r25 IF r = 26 THEN: GOSUB r26 IF r = 27 THEN: GOSUB r27 IF r = 28 THEN: GOSUB r28 IF r = 29 THEN: GOSUB r29 IF r = 30 THEN: GOSUB r30 IF r = 31 THEN: GOSUB r31 IF r = 32 THEN: GOSUB r32 IF r = 33 THEN: GOSUB r33 IF r = 34 THEN: GOSUB r34 IF r = 35 THEN: GOSUB r35 IF r = 36 THEN: GOSUB r36 IF r = 37 THEN: GOSUB r37 IF r = 38 THEN: GOSUB r38 IF r = 39 THEN: GOSUB r39 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotdoll = 1 THEN: PRINT "A little girls doll." IF gotphoto = 1 THEN: PRINT "A photo of a happy family. They've seen better days." IF gotrag = 1 THEN: PRINT "A blood soaked rag." IF gotskull = 1 THEN: PRINT "The skull of a recently dug up body. Poor soul." PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 4 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 14: GOTO moved IF r = 14 THEN: r = 15: GOTO moved IF r = 15 THEN: r = 17: GOTO moved IF r = 17 THEN: r = 18: GOTO moved IF r = 18 THEN: r = 19: GOTO moved IF r = 12 THEN: r = 13: GOTO moved IF r = 9 THEN: r = 10: GOTO moved IF r = 22 THEN: r = 23: GOTO moved IF r = 23 THEN: r = 25: GOTO moved IF r = 25 THEN: r = 26: GOTO moved IF r = 10 THEN: r = 30: GOTO moved IF r = 30 THEN: r = 31: GOTO moved IF r = 31 THEN: r = 32: GOTO moved IF r = 38 THEN: r = 37: GOTO moved IF r = 37 THEN: r = 34: GOTO moved IF r = 39 THEN: r = 36: GOTO moved IF r = 36 THEN: r = 35: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 4 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 1: GOTO moved IF r = 12 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 9: GOTO moved IF r = 15 THEN: r = 16: GOTO moved IF r = 19 THEN: r = 20: GOTO moved IF r = 20 THEN: r = 21: GOTO moved IF r = 21 THEN: r = 22: GOTO moved IF r = 23 THEN: r = 24: GOTO moved IF r = 29 THEN: r = 28: GOTO moved IF r = 28 THEN: r = 26: GOTO moved IF r = 26 THEN: r = 27: GOTO moved IF r = 30 THEN: r = 38: GOTO moved IF r = 38 THEN: r = 39: GOTO moved IF r = 31 THEN: r = 37: GOTO moved IF r = 37 THEN: r = 36: GOTO moved IF r = 33 THEN: r = 32: GOTO moved IF r = 32 THEN: r = 34: GOTO moved IF r = 34 THEN: r = 35: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 26 THEN: r = 25: GOTO moved IF r = 25 THEN: r = 23: GOTO moved IF r = 23 THEN: r = 22: GOTO moved IF r = 22 THEN: r = 19: GOTO moved IF r = 19 THEN: r = 18: GOTO moved IF r = 18 THEN: r = 17: GOTO moved IF r = 17 THEN: r = 15: GOTO moved IF r = 15 THEN: r = 14: GOTO moved IF r = 14 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 4: GOTO moved IF r = 13 THEN: r = 12: GOTO moved IF r = 10 THEN: r = 9: GOTO moved IF r = 32 THEN: r = 31: GOTO moved IF r = 31 THEN: r = 30: GOTO moved IF r = 30 THEN: r = 10: GOTO moved IF r = 34 THEN: r = 37: GOTO moved IF r = 37 THEN: r = 38: GOTO moved IF r = 35 THEN: r = 36: GOTO moved IF r = 36 THEN: r = 39: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 4: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 11: GOTO moved IF r = 11 THEN: r = 12: GOTO moved IF r = 16 THEN: r = 15: GOTO moved IF r = 24 THEN: r = 23: GOTO moved IF r = 22 THEN: r = 21: GOTO moved IF r = 21 THEN: r = 20: GOTO moved IF r = 20 THEN: r = 19: GOTO moved IF r = 27 THEN: r = 26: GOTO moved IF r = 26 THEN: r = 28: GOTO moved IF r = 28 THEN: r = 29: GOTO moved IF r = 39 THEN: r = 38: GOTO moved IF r = 38 THEN: r = 30: GOTO moved IF r = 36 THEN: r = 37: GOTO moved IF r = 37 THEN: r = 31: GOTO moved IF r = 35 THEN: r = 34: GOTO moved IF r = 34 THEN: r = 32: GOTO moved IF r = 32 THEN: r = 33: GOTO moved END IF IF (cmd$ = "EXAMINE LITTLE GIRL") AND r = 27 THEN CLS PRINT "She's sitting on the edge of her bed, breathing in a very" PRINT "eerie way, that makes you feel as if this isn't a little girl!" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE MOTHER") AND r = 33 THEN CLS PRINT "A grin is etched upon her face, her eye's are wide open," PRINT "and she appears not to have slept in days." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE CAR") AND r = 1 THEN CLS PRINT "It's a small American hatchback. Built before you were born." PRINT "The doors arelocked just in case someone decided to go through" PRINT "your things. Better find a phone before it's to late." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE FIREPLACE") AND r = 12 THEN CLS PRINT "A large stone fireplace holds the inferno of hell itself." PRINT "A fire that hasalways been burning, always laughing," PRINT "as if it knew some sick joke." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "GET IN CAR") AND r = 1 THEN CLS PRINT "Maybe you should find a phone first before returning to your car." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE RAG") AND gotrag = 1 THEN CLS PRINT "An average run of the mill old rag, soaked in...fresh blood..." PRINT "odd." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE DOLL") AND gotdoll = 1 THEN CLS PRINT "The doll seems to have been homemade. Made by a loving parent of" PRINT "sorts." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE SKULL") AND gotskull = 1 THEN CLS PRINT "The old dusty skull that seems to be older than you are. It has " PRINT "a very old look to it. Now the real question is who's is it?" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE PHOTO") AND gotphoto = 1 THEN CLS PRINT "A happy photo of a loving family. A mother, father and loving child." PRINT "Just what happened here?" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK" OR cmd$ = "TALK TO MOTHER") AND mother = 1 AND r = 33 THEN CLS PRINT "What happened here? -You ask.- {He left me and you see" PRINT "I couldn't do anything but to blame that bitch...that's" PRINT "why I killed her, she tore this family apart. But I got" PRINT "the last laugh...I took her skull...and now she lingers" PRINT "in her roomnot saying a word.}" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "GIVE DOLL") AND gotdoll = 1 AND r = 33 THEN GOTO win END IF IF (cmd$ = "TALK" OR cmd$ = "TALK TO LITTLE GIRL") AND littlegirl = 1 AND r = 27 THEN CLS PRINT "She sits before you quietly and is muttering under" PRINT "her breath. {I must be a good girl and maybe Daddy" PRINT "will come back home...Mommy's mad at me...I'm scared." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF moved: RETURN r1: PRINT "You are standing outside next to your once running car. A blanket of" PRINT "dark clouds collect overhead and quickly the rain begins to fall to" PRINT "the Earth below. A cold breeze rushes past you. In the distance you" PRINT "cane see an old country house." RETURN r2: PRINT "As you walk down the dirt road, the rain falls even harder, and the wind" PRINT "embraces you like a Mother holding her child." RETURN r3: PRINT "The faint smell of the wet soil fills the air around you." RETURN r4: PRINT "You stand before a stone path leading up to the old sun stained " PRINT "doors." RETURN r5: PRINT "As you walk up the old stone steps which are quite slippery from the rain." PRINT "You notice that the door is open ajar. Not sure if you should knock or not." PRINT "a voice calls out to you, like an old woman of sorts, calling for you..." RETURN r6: PRINT "You are standing at the entraceway of the old country home. It's" PRINT "decorated as if it was stuck in the early thirties. Everything seems" PRINT "as if it hasn't been touched. A layer of dust blankets everything." RETURN r7: PRINT "An eerie silence fills the home and the stench of decay lingers in " PRINT "the air." RETURN r8: PRINT "With every step you take the sound of the floor creeking surrounds you." PRINT "The old wooden floor is warped and bends from your weight." RETURN r9: PRINT "You notice that the wallpaper is peeling from the the old wooden walls." PRINT "The silence is broken from what can only be described as the laughter of" PRINT "a small child...maybe you aren't alone after all?" RETURN r10: PRINT "You are standing before the dark and unsettling entrance to the basement." RETURN r11: PRINT "The small and streched out hallway leads you to the parlor room. The idea" PRINT "of getting to a phone fast is all that you can think of." RETURN r12: PRINT "Standing before the entrance of the parlor room. You are treated to another" PRINT "vacant room. The only thing that is alive is the crackling of the fireplace." RETURN r13: PRINT "You enter the parlor room and see what can only be describe as a room from an" PRINT "old film. The crackling of the fire and the glow that it gave off fills you" PRINT "with a feeling of sheer panic." IF gotskull = 0 THEN: PRINT "The old and mangled skull of a poor lost soul." IF gotskull = 1 THEN: PRINT "You figure why not. Who was the owner of this?" RETURN r14: PRINT "The smell of rotten food fills you're nose and makes you sick. Just who in" PRINT "the world could live here?" RETURN r15: PRINT "You are standing before a large staircase and the entranceway to the Kitchen." RETURN r16: PRINT "Though the smell of rotten food would have one think that the" PRINT "kitchen was littered with dishes of rotten food. But no...nothing" PRINT "at all. everything seemed clean." IF gotrag = 0 THEN: PRINT "A bloody rag rests on the floor." IF gotrag = 1 THEN: PRINT "You now have a bloody rag, for whatever reason." RETURN r17: PRINT "You walk the ever so groing staircase. To which seems as if it goes on forever." RETURN r18: PRINT "Standing at the top of the stairs, you look around, and find nobody there." PRINT "The lights are on, a fire is raging in the parlor room, and not a soul in sight." RETURN r19: PRINT "The old wooden floors sunk an inch with every step you took. The old railing" PRINT "was loose and looks as if it will give way and surcome to the laws of gravity." RETURN r20: PRINT "The old hallway gives the sense that you are being watched. But by who?" RETURN r21: PRINT "Laughter is heard from a child and the music from a" PRINT "music box draws your attention." RETURN r22: PRINT "Nothing but darkness and the odd sound that filled you with the sehse of dread." RETURN r23: PRINT "You are standing before the entranceway of a small room." RETURN r24: PRINT "You enter the small room that was no bigger than a prison cell." PRINT "The walls were covered in the same peeling wallpaper that you" PRINT "seen before. This must be the room of a child as shelves rested" PRINT "against the walls but were bare and a small bed rested in the" PRINT "corner." IF gotphoto = 0 THEN: PRINT "A family photo hangs on the wall." IF gotphoto = 1 THEN: PRINT "You now have a family photo that isn't of your family." RETURN r25: PRINT "You are not starting to wonder if this was the right thing to do?" PRINT "Maybe waiting in the car was the best option?" RETURN r26: PRINT "You approach another room and this time you see a small child sitting on the" PRINT "corner of the bed. A cold breeze passes you." RETURN r27: PRINT "Setting foot in the small room that was scarcely decorated. The small child was" PRINT "sitting on the corner of the bed. Rest by the pillows was her doll. Her skin was" PRINT "pale and she looked as if she hadn't slept in quite some time." IF gotdoll = 0 THEN: PRINT "A childs doll sit on the bed. It's eye's seem to follow you." IF gotdoll = 1 THEN: PRINT "You take the odd looking doll." RETURN r28: PRINT "The floor is covered in dust as if no one has set foot here in some time." RETURN r29: PRINT "A dead end. One would think this would lead to a room of some sort?" RETURN r30: PRINT "You are standing in the basement a lone light buld gives off a short beam" PRINT "of light gives it life. " RETURN r31: PRINT "The basements just as cold as the rest of the house. The dirt floor is packed" PRINT "down in such a way that the foot traffic alone must have turned it into stone." RETURN r32: PRINT "The loud breathing of someone is heard. The basement...it's the resting place of" PRINT "whoever is here." RETURN r33: PRINT "The lady of the house is sitting in an old rocking chair. Her clothes have been" PRINT "worn for quite some time. She's rubbing her hands and muttering to herself." RETURN r34: PRINT "The stone walls are allowing the cold entrance to this unholy place." RETURN r35: PRINT "With every step you take, you can sense the horrors that took place here." RETURN r36: PRINT "A seed of evil was planted here...planted by the hands of owner of this hellish" PRINT "home in the middle of nowhere." RETURN r37: PRINT "A sickening feeling overcomes you. It is as if someone or something is feasting" PRINT "on your life force." RETURN r38: PRINT "Thist part of the house is so uneven, so poorly constructed that it would explain" PRINT "why the floors upstairs are buckling." RETURN r39: PRINT "You are standing in the corner of the basement. The foul stench of urine lingers" PRINT "in the air." RETURN win: COLOR 2, 0 CLS PRINT "The unholy spirits that had called this place home have vanished." PRINT "You have given them the chance to move forward onto the next plain" PRINT "of existence. Though you weren't unable to find a phone in the" PRINT "madhouse in the middle of nowhere. But you were able to find away" PRINT "to escape the house that held the spirits of the dead for" PRINT "so long...besides...this house is you're new home now..." PRINT PRINT "Thank you for playing." DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "You weren't able to make it in time. Everything was suppose to work out" PRINT "for you! But not this time, no, not this time...farwell young fool." _DISPLAY END END SUB